namespace go product
include 'common.thrift'
struct Product{
	1:   i64               ID            (api.body = "id")
	2:   string            Name          (api.body = "name")
	3:   list<string>      SliderImage   (api.body = "slider_image")
	4:   string            Image         (api.body = "image")
	5:   string            ShortInfo     (api.body = "short_info")
	6:   string            CategoryName  (api.body = "category_name")
	7:   string            UnitName      (api.body = "unit_name")
	8:   string            Description   (api.body = "description")
	9:   list<ProductSpec> SpecList      (api.body = 'spec_list')
	10:  double            Price         (api.body = "price")
	11:  list<ProductItem> ItemList      (api.body = "item_list")
}

struct ProductItem{
	1:  string SKUID        (api.body = "sku")
	2:  i64    StoreNumber  (api.body = "store_number")
	3:  double Price        (api.body = "price")
	4:  string Image        (api.body = "iamge")
	5:  double MarketPrice  (api.body = "market_price")
}

struct ProductSpec{
	1:  i64                    ID         (api.body = "id")
	2:  string                 Name       (api.body = "name")
	3:  list<ProductSpecValue> SpecValue  (api.body = "spec_value")
}

struct ProductSpecValue{
	1:  i64    ID    (api.body = "id")
	2:  string Name  (api.body = "name")
}

struct GetProductInfoRequest{
	1:  i64 ID  (api.query = 'id')
}

struct GetProductInfoResponse{
	1:  Product Data  (api.body = 'data')
}

struct MGetProductRequest{
	1:  list<i64> IDs  (api.body = 'ids')
}

struct MGetProductResponse{
	1:  Product Data  (api.body = 'data')
}

struct GetProductListRequest{
	1:    string CategoryIDs      (api.query = 'category_ids')
	254:  i64 Page       = 1  (api.query = 'page')
	255:  i64 Size       = 20 (api.query = 'size')
}

struct GetProductListResponse{
	1:    list<Product>     Data        (api.body = 'data')
	255:  common.Pagination Pagination  (api.body = 'pagination')
}
